<?php /*a:1:{s:56:"/www/Data/Cloud/application/index/view/Admin/config.html";i:1628403934;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>基础表单</title>
    <link rel="stylesheet" href="/static/assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/assets/module/admin.css?v=318"/>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        #formBasForm {
            margin: 30px auto;
        }
        #formBasForm .layui-form-item {
            margin-bottom: 25px;
        }
    </style>
</head>
<body>
<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <!-- 表单开始 -->

            <div class="layui-form-item">
                <label class="layui-form-label ">站点名称:</label>
                <div class="layui-input-block">
                    <input name="site"  id="site" placeholder="" class="layui-input"
                           lay-verType="tips"  value="<?php echo htmlentities($data['site']); ?>"/>
                </div>
            </div>

            <input type="hidden" id="id" name="id" value="<?php echo htmlentities($data['id']); ?>">
            <div class="layui-form-item">
                <label class="layui-form-label">网址:</label>
                <div class="layui-input-block">
                    <input name="sitename" placeholder=""  id="sitename" class="layui-input"
                           lay-verType="tips"  value="<?php echo htmlentities($data['sitename']); ?>" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">SEO关键字:</label>
                <div class="layui-input-block">
                    <input name="keys_word" placeholder=""  id="keys_word" class="layui-input"
                           lay-verType="tips"  value="<?php echo htmlentities($data['keys_word']); ?>"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">站点描述:</label>
                <div class="layui-input-block">
                    <input name="miaoshu" placeholder=""  id="miaoshu" class="layui-input"
                           lay-verType="tips" value="<?php echo htmlentities($data['miaoshu']); ?>" />
                </div>
            </div>
             <div class="layui-form-item">
                <label class="layui-form-label">认证费:</label>
                <div class="layui-input-block">
                    <input name="config_val" placeholder=""  id="config_val" class="layui-input"
                           lay-verType="tips" value="<?php echo htmlentities($data['config_val']); ?>" />
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" id="formStepSubmit2">&emsp;修改&emsp;
                    </button>
                </div>
            </div>
            <!-- //表单结束 -->

        </div>
    </div>
</div>

<!-- js部分 -->
<script type="text/javascript" src="/static/assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="/static/assets/js/common.js?v=318"></script>
<script>
    layui.use(['layer', 'form', 'laydate','jquery'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var laydate = layui.laydate;
        var apikey;
        /* 渲染laydate */
        laydate.render({
            elem: '#formBasDateSel',
            trigger: 'click',
            range: true
        });

        /* 监听表单提交 */
        form.on('submit(formBasSubmit)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });




        $("#formStepSubmit2").click(function(){
            var site = $('#site').val();
            var id = $("#id").val();
            var sitename = $("#sitename").val();
            var keys_word = $("#keys_word").val();
            var miaoshu = $("#miaoshu").val();
            var config_val = $("#config_val").val();
            $.ajax({
                url:"/index/Admin/editSetting",
                dataType:"json",
                type:"post",
                data: {site:site, id:id,miaoshu:miaoshu,keys_word:keys_word,sitename:sitename,config_val:config_val},
                success:function(res){
                    console.log(res);
                    if (res.code === 1) {
                        layer.msg(res.msg);
                       
                    } else {
                        layer.msg(res.msg);
                    }
                }
            });
        })

    });
</script>
</body>
</html>